package com.itfreer.power.dao.jurisdiction;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;

import org.springframework.beans.BeanUtils;

import com.itfreer.form.api.JdbcBaseEntity;
import com.itfreer.power.dao.base.JdbcTreeEntityBase;
import com.itfreer.power.entity.jurisdiction.MapExtentJurisdictionEntity;

@Entity(name = "sso_jurisdiction_mapextent")
@Table(indexes = { 
        @Index(name="s_j_m_code", columnList="s_code"),
        @Index(name="s_j_m_pid", columnList="pid") })
public class JdbcMapExtentJurisdictionEntity extends JdbcTreeEntityBase implements JdbcBaseEntity<MapExtentJurisdictionEntity> {

	private static final long serialVersionUID = -4625811472910869800L;

	/**
	 * 地图范围
	 */
	@Column(name = "s_extents", nullable = true)
	private String mapExtents;
	
	/**
	 * 所属注册的服务
	 */
	@Column(name = "s_registerService", nullable = true)
	private String registerService;

	/**
	 * 地图范围
	 */
	public String getMapExtents() {
		return mapExtents;
	}

	/**
	 * 地图范围
	 */
	public void setMapExtents(String mapExtents) {
		this.mapExtents = mapExtents;
	}
	
	/**
	 * 所属注册的服务
	 */
	public String getRegisterService() {
		return registerService;
	}

	/**
	 * 所属注册的服务
	 */
	public void setRegisterService(String registerService) {
		this.registerService = registerService;
	}
	
	@Override
	public void from(MapExtentJurisdictionEntity t) {
		BeanUtils.copyProperties(t, this);
	}

	@Override
	public MapExtentJurisdictionEntity toEntity() {
		MapExtentJurisdictionEntity toEntity = new MapExtentJurisdictionEntity();
		BeanUtils.copyProperties(this, toEntity);
		return toEntity;
	}
}
